<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>全部用户列表</title>
</head>
<body>
<!--<a th:href="@{/student/addStudent}">添加学生信息</a>-->
<!--<br>-->
<!--<a th:href="@{/student/updateStudent}">更新学生信息</a>-->
<hr />
<div>
    <table>
        <tr>
            <th>id</th>
            <th>username</th>
            <th>sex</th>
            <th>team</th>
            <th>major</th>
        </tr>

        <tr th:each="user:${users}">
            <td  th:text="${user.id}"></td>
            <td  th:text="${user.username}"></td>
            <td  th:text="${user.sex}"></td>
            <td  th:text="${user.team}"></td>
            <td  th:text="${user.major}"></td>
        </tr>
    </table>
</div>

<div class="modal-footer no-margin-top">
    <ul class="pagination pull-right no-margin">

        <!-- 首页 -->
        <li>
            <a th:href="'/page/1'">首页</a>
        </li>

        <!-- 上一页 -->
        <li th:if="${currentPage - 1 > 0}">
            <a th:href="'/page/' + ${currentPage - 1}" th:text="上一页"></a>
        </li>

        <li th:text="'第'+${currentPage}+'页'">
        </li>


        <!-- 下一页 -->
        <li th:if="${currentPage + 1 <= pageCount}">
            <a th:href="'/page/' + ${currentPage + 1}" th:text="下一页"></a>
        </li>

        <!-- 尾页 -->
        <li>
            <a th:href="'/page/' + ${pageCount}">尾页</a>
        </li>

    </ul>


    <!--    使用分页插件-->
    <ul class="pagination pull-right no-margin">

        <!-- 首页 -->
        <li>
            <a th:href="'/pagehelper/1'">首页</a>
        </li>

        <!-- 上一页 -->
        <li th:if="${currentPage - 1 > 0}">
            <a th:href="'/pagehelper/' + ${currentPage - 1}" th:text="上一页"></a>
        </li>

        <li th:text="'第'+${currentPage}+'页'">
        </li>


        <!-- 下一页 -->
        <li th:if="${currentPage + 1 <= pageCount}">
            <a th:href="'/pagehelper/' + ${currentPage + 1}" th:text="下一页"></a>
        </li>

        <!-- 尾页 -->
        <li>
            <a th:href="'/pagehelper/' + ${pageCount}">尾页</a>
        </li>

    </ul>
</div>

</body>
</html>